/*** Eclipse Class Decompiler plugin, copyright (c) 2016 Chen Chao (cnfree2000@hotmail.com) ***/
package nc.impl.mm.prv;

import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;
import java.util.Vector;
import nc.bs.mp.mp3010.PoBO;
import nc.bs.mp.mp3010.PoMethodInvoker;
import nc.bs.mp.mp3010.PoProcessParameter;
import nc.bs.mp.mp3010.PoProcessTemplet;
import nc.bs.mp.mp3010.PoRplBO;
import nc.itf.mm.prv.IPo;
import nc.vo.bd.CorpVO;
import nc.vo.bd.b431.ProduceVO;
import nc.vo.bd.fd.DdVO;
import nc.vo.ds.ds3010.PlanConResultVO;
import nc.vo.mm.pub.KzcsVO;
import nc.vo.mm.pub.MMBusinessException;
import nc.vo.mm.pub.pub1025.PoVO;
import nc.vo.mm.pub.pub1030.OrsVO;
import nc.vo.mp.mp3010.AggPoTdVO;
import nc.vo.mp.mp3010.PoRplVO;
import nc.vo.mp.mp3010.ReleaseVO;
import nc.vo.pr.pray.PraybillVO;
import nc.vo.pub.AggregatedValueObject;
import nc.vo.pub.BusinessException;
import nc.vo.pub.lang.UFDate;
import nc.vo.pub.lang.UFDouble;
import nc.vo.pub.query.ConditionVO;
import nc.vo.scm.pub.session.ClientLink;
import nc.vo.sm.UserVO;

public class PoImpl implements IPo {
   public PoVO findByPK(String param0) throws BusinessException {
      return (new PoBO()).findByPK(param0);
   }

   public PoVO[] findPoVOByPKs(String[] pks) throws BusinessException {
      if(pks == null) {
         return null;
      } else {
         PoBO bo = new PoBO();
         PoVO[] povos = new PoVO[pks.length];

         for(int i = 0; i < pks.length; ++i) {
            povos[i] = bo.findByPK(pks[i]);
         }

         return povos;
      }
   }

   public String getPoBillCode(String param0, String param1, String param2, String param3) throws BusinessException {
      return (new PoBO()).getBillCode(param0, param1, param2, param3);
   }

   public String[] insertPoArray(PoVO[] param0, String param1) throws BusinessException {
      return (new PoBO()).insertArray(param0, param1);
   }

   public void checkPOstart(String param0) throws BusinessException {
      (new PoBO()).checkPOstart(param0);
   }

   public void freeArray(String[] param0, String param1) throws BusinessException {
      (new PoBO()).freeArray(param0, param1);
   }

   public boolean lockArray(String[] param0, String param1) throws BusinessException {
      return (new PoBO()).lockArray(param0, param1);
   }

   public String deleteByXsdd(String param0, String[] param1, String[] param2, String[] param3, String param4) throws BusinessException {
      return (new PoBO()).deleteByXsdd(param0, param1, param2, param3, param4);
   }

   public PoVO[] findByJhddh(String param0, String param1, String[] param2) throws BusinessException {
      return (new PoBO()).findByJhddh(param0, param1, param2);
   }

   public void importPos(PoVO[] importVOs, boolean isUpdate, String userID, Integer plantype) throws BusinessException {
      (new PoBO()).importPos(importVOs, isUpdate, userID, plantype);
   }

   public DdVO[] findDictForPo() throws BusinessException {
      return (new PoBO()).findDictForPo();
   }

   public Hashtable findExcepts(String param0, String param1, String param2) throws BusinessException {
      return (new PoBO()).findExcepts(param0, param1, param2);
   }

   public String getCurrentPs(int param0, String param1, String param2) throws BusinessException {
      return (new PoBO()).getCurrentPs(param0, param1, param2);
   }

   public ProduceVO getProduct(String param0) throws BusinessException {
      return (new PoBO()).getProduct(param0);
   }

   public String[] insertJhddArray(PoVO[] param0, String param1) throws BusinessException {
      return (new PoBO()).insertJhddArray(param0, param1);
   }

   public void insertOrsArray(ArrayList param0, PraybillVO param1) throws BusinessException {
      (new PoBO()).insertOrsArray(param0, param1);
   }

   public String onPoCancel(String[] param0, String param1) throws BusinessException {
      return (new PoBO()).onPoCancel(param0, param1);
   }

   public String onPoCancelWithPoVO(PoVO[] param0, String[] param1, String param2) throws BusinessException {
      return (new PoBO()).onPoCancel(param0, param1, param2);
   }

   public Vector onPoCancleRelease(PoVO[] param0, String param1, String param2) throws BusinessException {
      return (new PoBO()).onPoCancleRelease(param0, param1, param2);
   }

   public String onPoConfirm(String[] param0, String param1) throws BusinessException {
      return (new PoBO()).onPoConfirm(param0, param1);
   }

   public String onPoRelease(PoVO[] param0, boolean param1, UserVO param2, String param3, ClientLink cl, CorpVO vo) throws BusinessException {
      return (new PoBO()).onPoRelease(param0, param1, param2, param3, cl, vo);
   }

   public String[] onPoReleaseToProduceFactory(PoVO[] povos, String pk_corp, String gcbm, String pk_user) throws BusinessException {
      return (new PoBO()).onPoReleaseToProduceFactory(povos, pk_corp, gcbm, pk_user);
   }

   public PraybillVO potopro(ArrayList param0, UFDate param1, String param2) throws BusinessException {
      return (new PoBO()).potopro(param0, param1, param2);
   }

   public ArrayList sortPO(ReleaseVO param0) throws BusinessException {
      return (new PoBO()).sortPO(param0);
   }

   public boolean combineOrder(Vector param0, String param1) throws BusinessException {
      return (new PoBO()).combineOrder(param0, param1);
   }

   public Vector getRpcJhddh(PoVO[] param0) throws BusinessException {
      return (new PoBO()).getRpcJhddh(param0);
   }

   public Vector getFangan(String param0, String param1, String param2) throws BusinessException {
      return (new PoBO()).getFangan(param0, param1, param2);
   }

   public void onPoCancelOver(String[] param0, String param1) throws BusinessException {
      (new PoBO()).onPoCancelOver(param0, param1);
   }

   public void onPoOver(String[] param0, String param1) throws BusinessException {
      (new PoBO()).onPoOver(param0, param1);
   }

   public String[] insertPOs(PoVO[] param0) throws BusinessException {
      return (new PoBO()).insertPOs(param0);
   }

   public void delete_Po(String[] param0, String[] jhddhs, String coprid, String factoryID, String param1) throws BusinessException {
      (new PoBO()).delete(param0, jhddhs, coprid, factoryID, param1);
   }

   public void delete_Po(String[] param0, String param1) throws BusinessException {
      (new PoBO()).delete(param0, param1);
   }

   public String insert_Po(PoVO vo) throws BusinessException {
      return (new PoBO()).insert(vo);
   }

   public PoVO[] query_Po(ConditionVO[] param0) throws BusinessException {
      return (new PoBO()).query(param0);
   }

   public PoVO[] query_planvo(ConditionVO[] param0) throws BusinessException {
      return (new PoBO()).queryForPlanCon(param0);
   }

   public Map<String, String> query_jhywl(String param0) throws BusinessException {
      return (new PoBO()).queryJhyWl(param0);
   }

   public void update_Po(final PoVO vo) throws BusinessException {
      (new PoProcessTemplet()).doProcess(new PoProcessParameter(new PoVO[]{vo}), new PoMethodInvoker() {
         public Object invoke(PoBO po) throws BusinessException {
            po.update(vo);
            return null;
         }
      });
   }

   public void updateTableColunm(String tablename, String[] pks, String columnName, String[] columnValues) throws BusinessException {
      (new PoBO()).updateTableColunm(tablename, pks, columnName, columnValues);
   }

   public void update_Po(PoVO[] vos) throws BusinessException {
      PoVO[] arr$ = vos;
      int len$ = vos.length;

      for(int i$ = 0; i$ < len$; ++i$) {
         PoVO vo = arr$[i$];
         this.update_Po(vo);
      }

   }

   public PoVO outsourcing(final PoVO vo, final String billDate, final String userid) throws BusinessException {
      return (PoVO)(new PoProcessTemplet()).doProcess(new PoProcessParameter(new PoVO[]{vo}), new PoMethodInvoker() {
         public Object invoke(PoBO po) throws BusinessException {
            return po.outsourcing(vo, billDate, userid);
         }
      });
   }

   public UFDouble[] findPOIDRelationNum(String poid) throws BusinessException {
      return (new PoBO()).findPOIDRelationNum(poid);
   }

   public Map<String, UFDouble[]> findPOIDRelationNum(String[] poids) throws BusinessException {
      return (new PoBO()).findPOIDRelationNum(poids);
   }

   public PoVO onPoTransfer(final PoVO curPo, final PoVO[] transferVos, final String userid) throws BusinessException {
      return (PoVO)(new PoProcessTemplet()).doProcess(new PoProcessParameter(new PoVO[]{curPo}), new PoMethodInvoker() {
         public Object invoke(PoBO po) throws BusinessException {
            return po.onPoTransfer(curPo, transferVos, userid);
         }
      });
   }

   public PoVO onPoTransferCancel(final PoVO curPo, final String userid, final String coprid, final String factoryID) throws BusinessException {
      return (PoVO)(new PoProcessTemplet()).doProcess(new PoProcessParameter(new PoVO[]{curPo}), new PoMethodInvoker() {
         public Object invoke(PoBO po) throws BusinessException {
            return po.onPoTransferCancel(curPo, userid, coprid, factoryID);
         }
      });
   }

   public PoVO onPoCombine(final PoVO[] curPos, final PoVO transferVo, final String userid) throws BusinessException {
      return (PoVO)(new PoProcessTemplet()).doProcess(new PoProcessParameter(curPos), new PoMethodInvoker() {
         public Object invoke(PoBO po) throws BusinessException {
            return po.onPoCombine(curPos, transferVo, userid);
         }
      });
   }

   public KzcsVO queryPsKzcs(String pkCorp, String gcbmid, String pspk, String cs) throws BusinessException {
      return (new PoBO()).queryPsKzcs(pkCorp, gcbmid, pspk, cs);
   }

   public Map<String, List<String>> getExistJhddhs(PoVO[] vos, Integer plantype) throws BusinessException {
      return (new PoBO()).getExistJhddhs(vos, plantype);
   }

   public boolean checkInherited(String poid) throws BusinessException {
      return (new PoBO()).checkInherited(poid);
   }

   public boolean verifyIsReplaceBill(String jhddh) throws BusinessException {
      return (new PoBO()).verifyIsReplaceBill(jhddh);
   }

   public boolean verifyIsProduceBill(PoVO[] vos) throws BusinessException {
      return (new PoBO()).verifyIsProduceBill(vos);
   }

   public List<String> filterPo(String[][] producepks, int type, int isCnWorkCenter) throws BusinessException {
      return (new PoBO()).filterPoVO(producepks, type, isCnWorkCenter);
   }

   public Vector getCombinePO(PoVO[] param0) throws BusinessException {
      return (new PoBO()).getCombinePO(param0);
   }

   public Vector[] getCombAndCombedPO(PoVO[] param0) throws BusinessException {
      return (new PoBO()).getCombAndCombedPO(param0);
   }

   public void genPrayBill(AggregatedValueObject aggvo, String logDate, ReleaseVO userObj) throws BusinessException {
      (new PoBO()).genePrayBill(aggvo, logDate, userObj);
   }

   public void genAlloc(AggregatedValueObject aggvo, String allocTp, String logDate, ReleaseVO userObj) throws BusinessException {
      (new PoBO()).geneAlloc(aggvo, allocTp, logDate, userObj);
   }

   public AggPoTdVO queryAggPoTdVO(PoVO povo) throws BusinessException {
      return (new PoRplBO()).queryAggPoTdVO(povo);
   }

   public String[] recordPoRplData(String poPk, PoRplVO[] vos, Integer tdlx) throws BusinessException {
      return (new PoRplBO()).recordPoRplData(poPk, vos, tdlx);
   }

   public UFDouble[] queryOnHandQty(PoRplVO[] vos, PoVO povo) throws BusinessException {
      return (new PoRplBO()).getOnhandQty(vos, povo);
   }

   public PoRplVO[] procPoRplData(PoRplVO[] vos, PoVO povo, Integer tdlx) throws BusinessException {
      return (new PoRplBO()).procPoRplData(vos, povo, tdlx);
   }

   public PoRplVO[] procPoCLRplData(PoRplVO[] vos, PoVO povo, Integer tdlx) throws BusinessException {
      return (new PoRplBO()).procPoCLRplData(vos, povo, tdlx);
   }

   public void updatePoVOStatusByPK(String[] pks, String status) throws BusinessException {
      (new PoRplBO()).updatePoVOStatusByPK(pks, status);
   }

   public void updateTdztBySourceBillIds(String[] poids, String tdzt) throws BusinessException {
      (new PoRplBO()).updateTdztBySourceBillIds(poids, tdzt);
   }

   public void updatePoVOCombineIDByPK(String[] pks, String ID) throws BusinessException {
      (new PoRplBO()).updatePoVOCombineIDByPK(pks, ID);
   }

   public boolean isResourceRM(String pk) throws BusinessException {
      return (new PoRplBO()).isResourceRM(pk);
   }

   public boolean hasChildrenBills(String[] pks) throws BusinessException {
      return (new PoBO()).hasChildrenBills(pks);
   }

   public PoVO[] getOrsNumToPoVOs(PoVO[] poVOs) throws BusinessException {
      return (new PoBO()).getOrsNumToPoVOs(poVOs);
   }

   public String[] insertOrsVOArray(OrsVO[] orss) throws MMBusinessException {
      return (new PoBO()).insertOrsVOArray(orss);
   }

   public PlanConResultVO onPlanConPoRelease(PoVO[] povoArray, boolean isGenerating, UserVO user, String logDate, ClientLink cl, CorpVO corpVO) throws BusinessException {
      return (new PoBO()).onPlanConPoRelease(povoArray, isGenerating, user, logDate, cl, corpVO);
   }

   public boolean isNeedModifyPOTD(PoVO newPoVO) throws BusinessException {
      return (new PoBO()).isNeedModifyPOTD(newPoVO);
   }

   public boolean isPoHaveTdDatas(String pk_poid, Integer tdlx) throws BusinessException {
      return (new PoRplBO()).isPoHaveTdDatas(pk_poid, tdlx);
   }

   public List<String> queryPOIsHaveGeneratedOrder(String[] poids) throws BusinessException {
      return (new PoBO()).queryPOIsHaveGeneratedOrder(poids);
   }
}